Skip to content

Conversation

remicollet
Copy link
Contributor

See CDRIVER-832: export library verson in the API
See PHPC 305 Allow to build with system libmongoc

In first implementation of --with-libmongoc I have set version check to 1.1.5, as 1.2.0 doesn't exists yet, so I use this PR to raise it to correct 1.2.0 value.

I have add a symbol check to avoid breakage with 1.2.0beta1 which doesn't have the symbol yet (this check could perhaps be removed later...)

Of course mongodb/mongo-c-driver#265 should be merged before this one.

@bjori
Copy link
Contributor

bjori commented Sep 14, 2015

I don't think we need the symbol check.
When we bump the dependency to mongoc-beta1 we'll immediately depend on it as minimum version due to pr #101 and pr #105 among others.

@remicollet
Copy link
Contributor Author

Il will drop this check when 1.2.0beta2 (or rc) will be released (with this symbol)

php_phongo.c Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that 1.2.0-rc0 of libbson and libmongoc have bson_get_version() and mongoc_get_version() functions, respectively, should this be changed? The *_get_version() functions are both wrappers for returning the *_VERSION_S constants, so I'm not sure why the headers and library rows can't use the same.

The ssprintf() definitely appears problematic, as it'd miss the "rc0" suffix, which is present in the constant (and returned by the *_get_version() function).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous version use this because bson_get_version doesn"t exists yet.

@remicollet
Copy link
Contributor Author

In latest commit:

  • drop symbol check
  • add HAVE_LIBBSON and HAVE_LIBMONGOC constants

Notice I can't really test for now, build seems broken
(error: 'mongoc_write_result_t' has no member named 'writeConcernError')

@remicollet
Copy link
Contributor Author

Rebased see PR #120

@remicollet remicollet closed this Oct 4, 2015
@remicollet remicollet deleted the issue-libver branch October 4, 2015 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants